package region

import (
	"context"

	commonSdk "github.com/wangzhe1991/grpc-sdk/pb/common"
	regionSdk "github.com/wangzhe1991/grpc-sdk/pb/region"

	"gitee.com/krio/grpc-go-server/internal/service/region"
)

type CountryHandler struct {
	regionSdk.UnimplementedCountryServer
	countrySvc *region.CountryService
}

func NewCountryHandler(cSvc *region.CountryService) *CountryHandler {
	return &CountryHandler{
		countrySvc: cSvc,
	}
}

func (c *CountryHandler) List(ctx context.Context, req *commonSdk.EmptyRequest) (*regionSdk.CountryListResp, error) {
	return c.countrySvc.List(ctx, req)
}

func (c *CountryHandler) Detail(context.Context, *commonSdk.EmptyRequest) (*regionSdk.CountryListResp, error) {
	return &regionSdk.CountryListResp{}, nil
}
